import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'


import Layout from '@/layout/index.vue'

const routes: Array<RouteRecordRaw> = [
    {
        path: '/',
        name: 'index',
        component: () => import('@/views/index/index.vue') // 建议进行路由懒加载，优化访问性能
    },
    {
        path: '/ChatGPT',
        component: Layout,
        name: 'ChatGPT',
        children: [{
            path: '/ChatGPT/:path*',
            component: () => import('@/views/ChatGPT/index.vue')
        }]
    },
    {
        path: '/NewBing',
        component: Layout,
        name: 'NewBing',
        children: [{
            path: '/NewBing/:path*',
            component: () => import('@/views/NewBing/NewBing.vue')
        }]
    },
    {
        path: '/ChatGLM',
        component: Layout,
        name: 'ChatGLM',
        children: [{
            path: '/ChatGLM/:path*',
            component: () => import('@/views/ChatGLM/index.vue')
        }]
    },

]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router
